<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" 
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
<title data-layout-title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">飞扬的青春</title>
<link rel="stylesheet"
	data-th-href="@{../webjars/bootstrap/3.3.7-1/css/bootstrap.css}">
<link rel="stylesheet"
	data-th-href="@{../webjars/bootstrap/3.3.7-1/css/bootstrap-theme.css}">
<link rel="stylesheet"
	th:href="@{../webjars/bootstrap-table/1.9.1-1/bootstrap-table.css}">
<link rel="stylesheet"
	th:href="@{../webjars/bootstrap-select/2.0.0-beta1/dist/css/bootstrap-select.css}">
<link
	data-th-href="@{../webjars/bootstrapValidator/0.5.2/dist/css/bootstrapValidator.css}"
	rel="stylesheet" />
<link data-th-href="@{../dist/summernote.css}" rel="stylesheet" />
<link data-th-href="@{../dist/font-awesome-4.3.0/css/font-awesome.min.css}" rel="stylesheet">
<script type="text/javascript"
	data-th-src="@{../webjars/jquery/1.11.1/jquery.js}"></script>
<script data-th-src="@{../webjars/knockout/knockout.js}"
	type="text/javascript"></script>
<script
	data-th-src="@{../webjars/knockout-mapping/2.4.1/knockout.mapping.js}"
	type="text/javascript"></script>
<script type="text/javascript"
	data-th-src="@{../webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
<script data-th-src="@{../dist/summernote.min.js}"></script>
<script data-th-src="@{../dist/summernote-zh-CN.js}"></script>
<script type="text/javascript"
	th:src="@{../webjars/bootstrap-select/2.0.0-beta1/dist/js/bootstrap-select.js}"></script>
<script type="text/javascript"
	th:src="@{../webjars/bootstrap-select/2.0.0-beta1/dist/js/i18n/defaults-zh_CN.js}"></script>
<script data-th-src="@{../webjars/bootstrap-table/bootstrap-table.js}"></script>
<script
	data-th-src="@{../webjars/bootstrapValidator/0.5.2/dist/js/bootstrapValidator.js}"></script>
<script
	data-th-src="@{../webjars/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
<script data-th-src="@{../webjars/bootbox/4.4.0/bootbox.js}"></script>
<script type="text/javascript"
	data-th-src="@{../bootstrap-table/knockout.bootstrapTable.ljc.js}"></script>
<script type="text/javascript">
	function login() {
		var dialog = $('<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div>');
		var url = "[[${#httpServletRequest.contextPath+'/login'}]]";
		dialog.load(url);
		$("body").append(dialog);
		dialog.modal().on('hidden.bs.modal', function() {
			dialog.remove();
		});
	}
	function changePwd(){
		var dialog = $('<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div>');
		var url = "[[${#httpServletRequest.contextPath+'/changePwd'}]]";
		dialog.load(url);
		$("body").append(dialog);
		dialog.modal().on('hidden.bs.modal', function() {
			dialog.remove();
		});
		
	}	

	
	bootbox.setDefaults({
		locale:'zh_CN',
		size: 'small',
		title:'鎻愮ず'
	});
	
</script>

<style type="text/css">
section  : {
	margin-top: 70px;
}
/* .modal-backdrop{
	background-color: rgba(0,0,0,0) !important;
	z-index: 0 !important;
} */
</style>
</head>
<body>
	<header>
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar">abcd</span>
					</button>
					<a class="navbar-brand" href="#">飞扬的青春</a>
				</div>
				<div>
					<!-- <span th:if="${user!=null}" class="navbar-text"
						th:text="${'欢迎你:  '+user.name}"></span> -->
					<span sec:authorize="isAuthenticated()&&hasRole('ROLE_DEVELOPER')"  class="navbar-text">欢迎你：开发者</span>	
					<!-- <span sec:authorize="isAuthenticated()&&!hasRole('ROLE_DEVELOPER')"  class="navbar-text" data-th-text="'欢迎你：'+${session.userName}"></span>	 -->
					<span sec:authorize="isAuthenticated()&&!hasRole('ROLE_DEVELOPER')"  class="navbar-text">欢迎你：<span sec:authentication="principal.name"></span></span>	
				</div>
				<ul class="nav navbar-nav" sec:authorize="isAuthenticated()&&!hasRole('ROLE_DEVELOPER')">
					<li><a href="javascript:changePwd()"><span
							class="glyphicon glyphicon-erase"></span>修改密码</a></li>
				</ul>
				<ul class="nav navbar-nav"  sec:authorize="isAnonymous()">
					<li><a href="javascript:login()"><span
							class="glyphicon glyphicon-user"></span>登录</a></li>
				</ul>
				<div class="collapse navbar-collapse menuButton">
					<ul class="nav navbar-nav navbar-right">
						<li><a th:href="${#httpServletRequest.contextPath+'/'}"><span
								class="glyphicon glyphicon-home"></span>首页</a></li>
						<li class="dropdown" sec:authorize="isAuthenticated()"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown"> <span class="glyphicon glyphicon-cog"></span>
								设置<span class="caret"></span>
						</a>
							<ul class="dropdown-menu" role="menu">
								<!-- <li><a
									th:href="${#httpSerrvletRequest.contextPath+'/image/manage'}">上传图片</a></li> -->
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_DEVELOPER')"><a
									th:href="${#httpServletRequest.contextPath+'/banji/manage'}" >班级设置</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_DEVELOPER')"><a 
									th:href="${#httpServletRequest.contextPath+'/tea/manage'}">教师管理</a></li>
								<li ><a	th:href="${#httpServletRequest.contextPath+'/stu/manage'}">学生管理</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_DEVELOPER')"><a
									th:href="${#httpServletRequest.contextPath+'/course/manage'}">课程</a></li>
								<li><a th:href="${#httpServletRequest.contextPath+'/knowledge/manage'}">知识点</a></li>
								<li><a th:href="${#httpServletRequest.contextPath+'/file/manage'}">文件管理</a></li>
								<li><a th:href="${#httpServletRequest.contextPath+'/experence/manage'}">经验交流</a></li>
							</ul></li>
						<li sec:authorize="isAuthenticated()" class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown"><span class="glyphicon glyphicon-cog"></span>考核<span
								class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_TEACHER')"><a
									th:href="${#httpServletRequest.contextPath+'/test/manage'}">考核设定</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_TEACHER')"><a
									th:href="${#httpServletRequest.contextPath+'/scoring/manage'}">评分项管理</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')"><a
									th:href="${#httpServletRequest.contextPath+'/marking/manage'}">考核教师设置</a></li>
								<li><a
									th:href="${#httpServletRequest.contextPath+'/testRegister/manage'}">考试注册</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')||hasRole('ROLE_TEACHER')"><a
									th:href="${#httpServletRequest.contextPath+'/grading/manage'}">教师评分</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')"><a
									th:href="${#httpServletRequest.contextPath+'/calculate/manage'}">计算学生考核得分</a></li>
								<li sec:authorize="hasRole('ROLE_ADMIN')"><a
									th:href="${#httpServletRequest.contextPath+'/scoringGrade/manage2'}">教师评分查询</a></li>
								<li><a
									th:href="${#httpServletRequest.contextPath+'/gradeTable/first'}">学生成绩汇总</a></li>
							</ul></li>
							
						<li  class="dropdown" sec:authorize="isAuthenticated()"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown"><span class="glyphicon glyphicon-cog"></span>班级活动<span
								class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
								<li><a th:href="${#httpServletRequest.contextPath+'/activity/manage'}">班级活动登记</a></li>
								<li><a th:href="${#httpServletRequest.contextPath+'/activityAttachment/manage'}">活动附件上传</a></li>
							</ul></li>

						<li  sec:authorize="isAuthenticated()"><a th:href="${#httpServletRequest.contextPath+'/logout'}"
							title="注销"><span class="glyphicon glyphicon-off"></span>注销</a></li>
					</ul>
				</div>
			</div>
		</nav>

	</header>
	<section layout:fragment="content" style="margin-top: 70px;">
	</section>
	<footer>
		<div id="footer" class="container-fluid text-center">
			<p class="text-muted">
				Copyright &copy; 2015-2020 <a href="#">电信学院17级分层教学试点班  </a>
			</p>
		</div>
	</footer>
</body>
</html>